package com.yanqu.road.server.cmd.activity.jiuzhou.cross;

import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.pb.activity.jiuzhou.CrossJiuZhouProto;
import com.yanqu.road.server.cmd.base.AbstractCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.gameplayer.GamePlayer;
import com.yanqu.road.server.manger.activity.jiuzhou.JiuZhouMgr;
import com.yanqu.road.server.protocol.GameProtocol;

@Cmd(code = GameProtocol.S_JIU_ZHOU_CROSS_GET_GAME_ABILITY_DATA_REQ, desc = "跨服九州活动获取游戏服赚钱数据")
public class JiuZhouCrossNeedUploadCmd extends AbstractCommand {
    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        return true;
    }

    @Override
    public void execute(GamePlayer player, YanQuMessage packet) throws Exception {
        CrossJiuZhouProto.JiuZhouGetAbilityFromGameReqMsg reqMsg = CrossJiuZhouProto.JiuZhouGetAbilityFromGameReqMsg.parseFrom(packet.getBytes());
        int activityId = reqMsg.getActivityId();
        JiuZhouMgr.uploadEarnSpeed(activityId);
    }

    @Override
    public void sendData(GamePlayer player) {

    }
}
